package com.mxpio.erp.common.equipment.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_REPAIR_ASSISTANTS")
@Schema(description="维修协助人员")
public class EquipmentRepairAssistants extends BaseEntity {

	/**主键*/
	@Id
	@Generator
	@Column(name = "ID_", updatable = false)
	@Schema(description = "主键")
	private String id;
	/**工单编码*/
	@Column(name = "BIZ_NO_")
	@Schema(description = "维修工单编码")
	private String bizNo;

	@Schema(description = "工号")
	@Column(name = "PERSON_NO_")
	private String personNo;

	@Schema(description = "姓名")
	@Column(name = "PERSON_NAME_")
	private String personName;
	/**操作人*/
	@Column(name = "assister_")
	@Schema(description = "协助人")
	@Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
	private String assister;

	@Column(name = "MANHOUR_")
	@Schema(description = "工时")
	private String manHour;

	@Column(name = "CONTENT_")
	@Schema(description = "协助内容")
	private String content;

	@Column(name = "START_TIME_")
	@Schema(description = "开始时间")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	private Date startTime;

	@Column(name = "END_TIME_")
	@Schema(description = "结束时间")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	private Date endTime;
}
